$(function () {
	$("#jqGrid").jqGrid({
		url: baseURL + '/auth/accountHistoryList',
		datatype: "json",
		colModel: [         
		{label:"用户名",name:"username",width: 40},
		{label:"金额",name:"sum",width: 40},
		{label:"状态",name:"status",width: 40,formatter: function(value, options, row){
			if(value==0){  return  "待处理";}
			else if (value==1) {return "已处理";}
		}},
		{label:"类型",name:"type",width: 40},
		{label:"余额",name:"balance",width: 40},
		{ label: '时间', name: 'create_time', width: 100,formatter: function(value, options, row){
			console.log(value)
				return  parseTime(value);
			}}
		],
		viewrecords: true,
		height: 555,
		rowNum: 10,
		rowList : [10,30,50],
		rownumbers: true, 
		rownumWidth: 25, 
		autowidth:true,
		multiselect: true,
		scroll: false,
		pager: "#jqGridPager",
		jsonReader : {
			root: "data.data",
			page: "data.pageNo",
			records: "data.totalNum",
            total: "data.total"
		},
		prmNames : {
			page:"pageNo",
			rows:"pageSize", 
			order: "order"
		},
		gridComplete:function(){
            //隐藏grid底部滚动条
            $("#jqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" }); 
        }
    });
});
function transfer(id){


};

var vm = new Vue({
	el:'#rrapp',
	data:{
		q:{
			key: null
		},
		showList: true,
		title: null
	},
	methods: {
		reload: function () {
			vm.showList = true;
			var page = $("#jqGrid").jqGrid('getGridParam','page');
			$("#jqGrid").jqGrid('setGridParam',{ 
				postData:{'key': vm.q.key},
				page:page
			}).trigger("reloadGrid");
		}
	}
});